package service;

import beans.Plan;
import beans.Task;
import beans.User;
import dao.superDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class supervisorServiceImpl implements supervisorService {
    @Autowired
    private superDao superDao;
    @Override
    public List<Task> selectTaskByUserId(Integer userId) {
        return superDao.selectTaskByUserId(userId);
    }

    @Override
    public Task selectTaskById(Integer taskId) {
        return superDao.selectTaskById(taskId);
    }

    @Override
    public List<User> selectEmpByUserId(Integer userId) {
        return superDao.selectEmpByUserId(userId);
    }

    @Override
    public void updateTaskById(Task task) {
        superDao.updateTaskById(task);
    }

    @Override
    public void addTask(Task task) {
        superDao.addTask(task);
    }

    @Override
    public List<Plan> selectPlanByTaskId(Integer taskId) {
        return superDao.selectPlanByTaskId(taskId);
    }

    @Override
    public Plan selectPlanById(Integer planId) {
        return superDao.selectPlanById(planId);
    }

    @Override
    public User selectEmpById(Integer empId) {
        return superDao.selectEmpById(empId);
    }
}
